<template>
  <div class="page-title-box">
      <div class='page'>
        {{$route.meta.title}}
      </div>
      <div class="oprate" :class="{'mobile-oprate': device === 'mobile'}">
          <slot/>
      </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'pageHeader',
  computed: {
    ...mapGetters(['device'])
  },
  data () {
    return {
      
    };
  },
  components: {},
  mounted () {},
  methods: {}
}
</script>

<style lang='scss' scoped>
.page-title-box {
    background-color: #ffffff;
    width:100%;
    margin-bottom:10px;
    padding: 10px;
    box-shadow: 0 0px 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
    display: flex;
    
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    .page{
      min-width:200px;
        font-size:18px;
    }
    .oprate{
      flex:1;
      text-align:right
    }

    @media screen and (max-width: 768px) {
      padding: 10px 5px;
      
      .page {
        min-width: 100px;
        font-size: 16px;
      }
      
      .mobile-oprate {
        width: 100%;
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: flex-start;
        
        /deep/ .el-button {
          margin-left: 0 !important;
          padding: 7px 12px;
          font-size: 12px;
        }
      }
    }
}
</style>